IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'dbo.MyObject') AND type in (N'U'))
    DROP TABLE dbo.MyObject
GO
CREATE TABLE MyObject(
   Id int identity(1,1) PRIMARY KEY,
   ParentId int not null,
   LogicalId int not null,
   ObjectType int not null,
   HierarchyPath nvarchar(128),
   DeletedStatus bit default(0)
)
GO
